package cpr.data;

import java.util.Comparator;

import cpr.Utils;

public class AREComparator implements Comparator {
    public int compare(Object o1, Object o2) {
        AREntry a1 = (AREntry)o1;
        AREntry a2 = (AREntry)o2;
        if (a1==a2) return 0;
       // int d = a1.plus.size()-a2.plus.size();
        
        HLVector v1 = a1.vector;
        HLVector v2 = a2.vector;
        int s1 = Utils.getScore(v1);
        int s2 = Utils.getScore(v2);
        int d = s1-s2;
        if (d==0) {
            d = a1.toString().compareTo(a2.toString());
        }
        return d;
    }
}